<?php
namespace Admin\Model;
use Think\Model\RelationModel;

    class LoginModel extends RelationModel
    {
        protected $tableName = 'admin_user';

        protected $_link = array(
            'actor'=>array(
                'mapping_type'=>self::MANY_TO_MANY,
                'relation_table'=>'hx_user_actor',
                'foreign_key'=> 'user_id',
                'relation_foreign_key'=> 'actor_id',
            ),

            // 'role'=>array(
            //     'mapping_type'=>self::MANY_TO_MANY,
            //     'relation_table'=>'hx_actor_role',
            //     'foreign_key'=> 'actor_id',
            //     'relation_foreign_key'=> 'role_id',
            // ),
        );
    }
